<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>工厂信息</title>
    <link
      rel="stylesheet"
      href="https://fonts.googleapis.com/css?family=Roboto:400,700"
    />
    <!-- https://fonts.google.com/specimen/Roboto -->
    <link rel="stylesheet" href="static/css/fontawesome.min.css" />
    <!-- https://fontawesome.com/ -->
    <link rel="stylesheet" href="static/css/bootstrap.min.css" />
    <!-- https://getbootstrap.com/ -->
    <link rel="stylesheet" href="static/css/templatemo-style.css">
    <!--
	Product Admin CSS Template
	https://templatemo.com/tm-524-product-admin
	-->
    <style>
      .container{
<!--        background: red;-->
      }
    </style>
  </head>

  <body id="reportsPage" onload="insert_order_html({{order_num}}, '{{order_list}}');">

<script language="javascript">

function insert_order_html(Str1, list){
    str = ""
    temp = list.split("!")

    for (i=0;i<Number(Str1);++i){
        k = i.toString()
        tem = temp[i].split(",")

        str = str + "<tr>"
        str = str +  "<td>"+ tem[0] + "</td>&nbsp;"
        str = str +  "<td>"+ tem[1] + "</td>&nbsp;"
        str = str +  "<td>"+ tem[2]  + "</td>&nbsp;"
        str = str +  "<td>"+ tem[3] + "</td>&nbsp;"
        str = str +  "<td>"+ tem[4] + "</td>&nbsp;"
        str = str + "</tr>"
     }
 aa.innerHTML=str;
}

</script>
    <div class="" id="home">
      <nav class="navbar navbar-expand-xl">
        <div class="container h-100">
          <a class="navbar-brand" href="index.html">
            <h1 class="tm-site-title mb-0">欢迎来到 Unico Factory </h1>
          </a>
          <button
            class="navbar-toggler ml-auto mr-0" #
            type="button"
            data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent"
            aria-expanded="false"
            aria-label="Toggle navigation"

          >
            <i class="fas fa-bars tm-nav-icon"></i>
          </button>

          <div class="collapse navbar-collapse" id="navbarSupportedContent">
<!--            ul 列表   li每一列-->
            <ul class="navbar-nav mx-auto h-100">
              <li class="nav-item">
                <a class="nav-link" href="index.html">
                  <i class="fas fa-tachometer-alt"></i> 工厂成就
                  <span class="sr-only">(current)</span>
                </a>
              </li>
              <li class="nav-item">
              <a class="nav-link" href="adjust.html">
                <i class="far fa-file-alt"></i> 工厂信息
                <span class="sr-only">(current)</span>
              </a>
            </li>
              <li class="nav-item">
                <a class="nav-link" href="products.html">
                  <i class="fas fa-shopping-cart"></i> 生产订单
                </a>
              </li>

              <li class="nav-item">
                <a class="nav-link active" href="accounts.html">
                  <i class="far fa-user"></i> 工厂管理
                </a>
              </li>
              <li class="nav-item dropdown">
                <a
                  class="nav-link dropdown-toggle"
                  href="#"
                  id="navbarDropdown"
                  role="button"
                  data-toggle="dropdown"
                  aria-haspopup="true"
                  aria-expanded="false"
                >
                  <i class="fas fa-cog"></i>
                  <span> Settings <i class="fas fa-angle-down"></i> </span>
                </a>
                <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                  <a class="dropdown-item" href="#">null</a>
                  <a class="dropdown-item" href="#">null</a>
                  <a class="dropdown-item" href="#">null</a>
                </div>
              </li>
            </ul>
            <ul class="navbar-nav">
              <li class="nav-item">
                <a class="nav-link d-block" href="login.html">
                  Admin, <b>Logout</b>
                </a>
              </li>
            </ul>
          </div>
        </div>
      </nav>
      <div class="container mt-5">
        <div class="row tm-content-row">
          <div class="">
            <div class="tm-bg-primary-dark tm-block tm-block-settings">
              <h2 class="tm-block-title">新增工厂</h2>
              <form action="getFactoryInfo" class="tm-signup-form row">
                <div class="form-group col-lg-6">
                  <label for="name">工厂名字</label>
                  <input
                    id="name"
                    name="name"
                    type="text"
                    class="form-control validate"
                  />
                </div>
                <div class="form-group col-lg-6">
                  <label for="address">工厂地址</label>
                  <input
                    id="address"
                    name="address"
                    type="text"
                    class="form-control validate"
                  />
                </div>
                 <div class="form-group col-lg-3">
                </div>

                <div class="col-6">
                  <button
                    type="submit"
                    class="btn btn-primary btn-block text-uppercase"
                  >
                    新增工厂
                  </button>
                </div>
              </form>
            </div>
          </div>
        </div>

        <div class="container mt-5">
        <div class="row tm-content-row">
          <div class="">
            <div class="tm-bg-primary-dark tm-block tm-block-settings">
              <h2 class="tm-block-title">删除工厂</h2>
              <form action="delete_factory" class="tm-signup-form row">
                <div class="form-group col-lg-6">
                  <label for="name">工厂名字</label>
                  <input
                    id="delete_factory_name"
                    name="delete_factory_name"
                    type="text"
                    class="form-control validate"
                  />
                </div>
                 <div class="form-group col-lg-3">
                </div>

                <div class="col-6">
                  <button
                    type="submit"
                    class="btn btn-primary btn-block text-uppercase"
                  >
                    删除工厂
                  </button>
                </div>
              </form>
            </div>
          </div>
        </div>


        <h2 class="tm-block-title">查询结果</h2>
      <div class="">
        <div class="">
          <div class="tm-bg-primary-dark tm-block tm-block-products">
            <div class="tm-product-table-container">
              <table class="table table-hover tm-table-small tm-product-table">
                <thead>
                  <tr>
                      <th scope="col">工厂编号</th>
                      <th scope="col">工厂名字</th>
                      <th scope="col">工厂地址</th>
                      <th scope="col">坏物批次</th>
                      <th scope="col">停业开始时间</th>
                  </tr>
                </thead>
                <tbody id="aa"></tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
      </div>

      <footer class="tm-footer row tm-mt-small">
        <div class="col-12 font-weight-light">
          <p class="text-center text-white mb-0 px-4 small">Copyright &copy; 2020.Company name All rights reserved.<a target="_blank" href="http://sc.chinaz.com/moban/">Unico</a></p>
        </div>
      </footer>
    </div>

    <script src="static/js/jquery-3.3.1.min.js"></script>
    <!-- https://jquery.com/download/ -->
    <script src="static/js/bootstrap.min.js"></script>
    <!-- https://getbootstrap.com/ -->
  </body>
</html>
